package cn.hairui.blog.service;

import cn.hairui.blog.entity.Likerecord;
import cn.hairui.blog.dao.LikerecordMapper;
import cn.hairui.blog.service.LikerecordService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 点赞记录表 服务实现类
 * </p>
 *
 * @author laoganbu
 * @since 2020-04-28
 */
@Service
public class LikerecordServiceImpl extends ServiceImpl<LikerecordMapper, Likerecord> implements LikerecordService {

    @Autowired
    private LikerecordMapper likerecordMapper;

    @Override
    public int countLikeRecord(int id) {
        return likerecordMapper.countLikeRecord(id);
    }

    @Override
    public Likerecord selectByIpAndArticalId(String ipAddress, int id) {
        return likerecordMapper.selectByIpAndArticalId(ipAddress, id);
    }
}
